package cn.tedu.spring.di;

import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//  依赖注入演示
@ToString
@Component
public class UserDao {
//    @Value注解:基本类型的依赖注入
    @Value("root")
    private String userName;

    @Value("root")
    private String password;

    @Value("jdbc:mysql://localhost:3309/tedu?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true")
    private String url;
}
